package com.wzk.travelspringboot.dto;

import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.springframework.web.multipart.MultipartFile;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.time.LocalTime;

/**
 * @Author: WangZiKang
 * @Date: 2025/1/8 21:36
 */
@Data
public class ScenicDTO {

    @NotBlank(message = "景区名称不能为空")
    @Length(min = 2,message = "景区名称长度不能小于2位")
    private String name;

    @NotBlank(message = "景点地区不能为空")
    private String area;

    @NotBlank(message = "景点类型不能为空")
    private String type;

    @NotBlank(message = "景点详细地址不能为空")
    private String addressDetail;

    @NotNull
    @Min(value = 0,message = "最小值不能小于0")
    private Double ticketPrice;

    @NotBlank(message = "景区详细信息不能为空")
    private String info;

    @NotBlank(message = "景区开放时间不能为空")
    private LocalTime openTime;

    //图片
    @Length(min = 1,message = "景点图片不能少于一张")
    private MultipartFile[] images;

}
